package application.view.components 
{
	import application.util.ResourceUtil;
	import flash.display.MovieClip;
	import flash.events.Event;
	import flash.events.MouseEvent;
	
	/**
	 * ...
	 * @author dragonWorrior
	 */
	public class MenuComponent extends MovieClip 
	{
		private var mcMenu:MovieClip;
		public static const CLICK_PRACTICE:String = "click_practice";
		public static const CLICK_LEVEL:String = "click_level";
		public static const CLICK_COUNT:String = "click_count";
		
		public function MenuComponent() 
		{
			mcMenu = ResourceUtil.getDisplayObject("shooting.ui.menu") as MovieClip;
			addChild(mcMenu);
			
			mcMenu.btn_practice.addEventListener(MouseEvent.CLICK, onPractice);
		}
		
		private function onPractice(e:MouseEvent):void
		{
			dispatchEvent(new Event(CLICK_PRACTICE));
		}
		
		private function onLevel(e:MouseEvent):void
		{
			dispatchEvent(new Event(CLICK_LEVEL));
		}
		
		private function onCount(e:MouseEvent):void
		{
			dispatchEvent(new Event(CLICK_COUNT));
		}
		
	}

}